3.466 \(\int \frac {\sec ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx\)
Optimal. Leaf size=155 \[ -\frac {2 b \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 d \left (a^2-b^2\right )}+\frac {b^2 \tan (c+d x)}{a d \left (a^2-b^2\right ) (a+b \cos (c+d x))}+\frac {2 b^2 \left (3 a^2-2 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^3 d (a-b)^{3/2} (a+b)^{3/2}} \]
[Out]
2*b^2*(3*a^2-2*b^2)*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^3/(a-b)^(3/2)/(a+b)^(3/2)/d-2*b*arcta
nh(sin(d*x+c))/a^3/d+(a^2-2*b^2)*tan(d*x+c)/a^2/(a^2-b^2)/d+b^2*tan(d*x+c)/a/(a^2-b^2)/d/(a+b*cos(d*x+c))
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 155, normalized size of antiderivative = 1.00,
number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used =
{2802, 3055, 3001, 3770, 2659, 205} \[ \frac {2 b^2 \left (3 a^2-2 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^3 d (a-b)^{3/2} (a+b)^{3/2}}+\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 d \left (a^2-b^2\right )}+\frac {b^2 \tan (c+d x)}{a d \left (a^2-b^2\right ) (a+b \cos (c+d x))}-\frac {2 b \tanh ^{-1}(\sin (c+d x))}{a^3 d} \]
Antiderivative was successfully verified.
[In]
Int[Sec[c + d*x]^2/(a + b*Cos[c + d*x])^2,x]
[Out]
(2*b^2*(3*a^2 - 2*b^2)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^3*(a - b)^(3/2)*(a + b)^(3/2)*d)
- (2*b*ArcTanh[Sin[c + d*x]])/(a^3*d) + ((a^2 - 2*b^2)*Tan[c + d*x])/(a^2*(a^2 - b^2)*d) + (b^2*Tan[c + d*x])
/(a*(a^2 - b^2)*d*(a + b*Cos[c + d*x]))
Rule 205
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 2659
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[(2*e)/d, Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 2802
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> -S
imp[(b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 -
b^2)), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n
*Simp[a*(b*c - a*d)*(m + 1) + b^2*d*(m + n + 2) - (b^2*c + b*(b*c - a*d)*(m + 1))*Sin[e + f*x] - b^2*d*(m + n
+ 3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] &
& NeQ[c^2 - d^2, 0] && LtQ[m, -1] && IntegersQ[2*m, 2*n] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !
(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Rule 3001
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
&& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Rule 3055
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> -Simp[((A*b^2 - a*b*B + a^2*C)*Cos[e +
f*x]*(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n + 1))/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2)), x] + Dis
t[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[(m + 1)*(b
*c - a*d)*(a*A - b*B + a*C) + d*(A*b^2 - a*b*B + a^2*C)*(m + n + 2) - (c*(A*b^2 - a*b*B + a^2*C) + (m + 1)*(b*
c - a*d)*(A*b - a*B + b*C))*Sin[e + f*x] - d*(A*b^2 - a*b*B + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /;
FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && Lt
Q[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] &&
!IntegerQ[m]) || EqQ[a, 0])))
Rule 3770
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx &=\frac {b^2 \tan (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \frac {\left (a^2-2 b^2-a b \cos (c+d x)+b^2 \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{a+b \cos (c+d x)} \, dx}{a \left (a^2-b^2\right )}\\ &=\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 \left (a^2-b^2\right ) d}+\frac {b^2 \tan (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\int \frac {\left (-2 b \left (a^2-b^2\right )+a b^2 \cos (c+d x)\right ) \sec (c+d x)}{a+b \cos (c+d x)} \, dx}{a^2 \left (a^2-b^2\right )}\\ &=\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 \left (a^2-b^2\right ) d}+\frac {b^2 \tan (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}-\frac {(2 b) \int \sec (c+d x) \, dx}{a^3}+\frac {\left (b^2 \left (3 a^2-2 b^2\right )\right ) \int \frac {1}{a+b \cos (c+d x)} \, dx}{a^3 \left (a^2-b^2\right )}\\ &=-\frac {2 b \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 \left (a^2-b^2\right ) d}+\frac {b^2 \tan (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}+\frac {\left (2 b^2 \left (3 a^2-2 b^2\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^3 \left (a^2-b^2\right ) d}\\ &=\frac {2 b^2 \left (3 a^2-2 b^2\right ) \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^3 (a-b)^{3/2} (a+b)^{3/2} d}-\frac {2 b \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac {\left (a^2-2 b^2\right ) \tan (c+d x)}{a^2 \left (a^2-b^2\right ) d}+\frac {b^2 \tan (c+d x)}{a \left (a^2-b^2\right ) d (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.97, size = 163, normalized size = 1.05 \[ \frac {-\frac {2 b^2 \left (2 b^2-3 a^2\right ) \tanh ^{-1}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {b^2-a^2}}\right )}{\left (b^2-a^2\right )^{3/2}}-\frac {a b^3 \sin (c+d x)}{(a-b) (a+b) (a+b \cos (c+d x))}+a \tan (c+d x)+2 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}{a^3 d} \]
Antiderivative was successfully verified.
[In]
Integrate[Sec[c + d*x]^2/(a + b*Cos[c + d*x])^2,x]
[Out]
((-2*b^2*(-3*a^2 + 2*b^2)*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(3/2) + 2*b*Log[C
os[(c + d*x)/2] - Sin[(c + d*x)/2]] - 2*b*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - (a*b^3*Sin[c + d*x])/((a
- b)*(a + b)*(a + b*Cos[c + d*x])) + a*Tan[c + d*x])/(a^3*d)
________________________________________________________________________________________
fricas [B] time = 2.11, size = 750, normalized size = 4.84 \[ \left [-\frac {{\left ({\left (3 \, a^{2} b^{3} - 2 \, b^{5}\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, a^{3} b^{2} - 2 \, a b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (d x + c\right ) + b\right )} \sin \left (d x + c\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}\right ) + 2 \, {\left ({\left (a^{4} b^{2} - 2 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left ({\left (a^{4} b^{2} - 2 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4} + {\left (a^{5} b - 3 \, a^{3} b^{3} + 2 \, a b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{7} b - 2 \, a^{5} b^{3} + a^{3} b^{5}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} d \cos \left (d x + c\right )\right )}}, \frac {{\left ({\left (3 \, a^{2} b^{3} - 2 \, b^{5}\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, a^{3} b^{2} - 2 \, a b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (d x + c\right )}\right ) - {\left ({\left (a^{4} b^{2} - 2 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (a^{4} b^{2} - 2 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4} + {\left (a^{5} b - 3 \, a^{3} b^{3} + 2 \, a b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{{\left (a^{7} b - 2 \, a^{5} b^{3} + a^{3} b^{5}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{8} - 2 \, a^{6} b^{2} + a^{4} b^{4}\right )} d \cos \left (d x + c\right )}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^2,x, algorithm="fricas")
[Out]
[-1/2*(((3*a^2*b^3 - 2*b^5)*cos(d*x + c)^2 + (3*a^3*b^2 - 2*a*b^4)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*c
os(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^
2)/(b^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) + 2*((a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^2 + (a^5*b -
2*a^3*b^3 + a*b^5)*cos(d*x + c))*log(sin(d*x + c) + 1) - 2*((a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x + c)^2 + (a^5
*b - 2*a^3*b^3 + a*b^5)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2*(a^6 - 2*a^4*b^2 + a^2*b^4 + (a^5*b - 3*a^3*b
^3 + 2*a*b^5)*cos(d*x + c))*sin(d*x + c))/((a^7*b - 2*a^5*b^3 + a^3*b^5)*d*cos(d*x + c)^2 + (a^8 - 2*a^6*b^2 +
a^4*b^4)*d*cos(d*x + c)), (((3*a^2*b^3 - 2*b^5)*cos(d*x + c)^2 + (3*a^3*b^2 - 2*a*b^4)*cos(d*x + c))*sqrt(a^2
- b^2)*arctan(-(a*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - ((a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x +
c)^2 + (a^5*b - 2*a^3*b^3 + a*b^5)*cos(d*x + c))*log(sin(d*x + c) + 1) + ((a^4*b^2 - 2*a^2*b^4 + b^6)*cos(d*x
+ c)^2 + (a^5*b - 2*a^3*b^3 + a*b^5)*cos(d*x + c))*log(-sin(d*x + c) + 1) + (a^6 - 2*a^4*b^2 + a^2*b^4 + (a^5*
b - 3*a^3*b^3 + 2*a*b^5)*cos(d*x + c))*sin(d*x + c))/((a^7*b - 2*a^5*b^3 + a^3*b^5)*d*cos(d*x + c)^2 + (a^8 -
2*a^6*b^2 + a^4*b^4)*d*cos(d*x + c))]
________________________________________________________________________________________
giac [B] time = 0.70, size = 332, normalized size = 2.14 \[ -\frac {2 \, {\left (\frac {{\left (3 \, a^{2} b^{2} - 2 \, b^{4}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{5} - a^{3} b^{2}\right )} \sqrt {a^{2} - b^{2}}} + \frac {a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 2 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )} {\left (a^{4} - a^{2} b^{2}\right )}} + \frac {b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac {b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^2,x, algorithm="giac")
[Out]
-2*((3*a^2*b^2 - 2*b^4)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) -
b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^5 - a^3*b^2)*sqrt(a^2 - b^2)) + (a^3*tan(1/2*d*x + 1/2*c)^3 - a^
2*b*tan(1/2*d*x + 1/2*c)^3 - a*b^2*tan(1/2*d*x + 1/2*c)^3 + 2*b^3*tan(1/2*d*x + 1/2*c)^3 + a^3*tan(1/2*d*x + 1
/2*c) + a^2*b*tan(1/2*d*x + 1/2*c) - a*b^2*tan(1/2*d*x + 1/2*c) - 2*b^3*tan(1/2*d*x + 1/2*c))/((a*tan(1/2*d*x
+ 1/2*c)^4 - b*tan(1/2*d*x + 1/2*c)^4 + 2*b*tan(1/2*d*x + 1/2*c)^2 - a - b)*(a^4 - a^2*b^2)) + b*log(abs(tan(1
/2*d*x + 1/2*c) + 1))/a^3 - b*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^3)/d
________________________________________________________________________________________
maple [A] time = 0.09, size = 271, normalized size = 1.75 \[ -\frac {2 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \,a^{2} \left (a^{2}-b^{2}\right ) \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b +a +b \right )}+\frac {6 b^{2} \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{d a \left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {4 b^{4} \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{d \,a^{3} \left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {2 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d \,a^{3}}-\frac {1}{d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {1}{d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {2 b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(d*x+c)^2/(a+b*cos(d*x+c))^2,x)
[Out]
-2/d*b^3/a^2/(a^2-b^2)*tan(1/2*d*x+1/2*c)/(a*tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)^2*b+a+b)+6/d*b^2/a/(a-b)/
(a+b)/((a-b)*(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))-4/d*b^4/a^3/(a-b)/(a+b)/((a-b)*
(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2))+2/d*b/a^3*ln(tan(1/2*d*x+1/2*c)-1)-1/d/a^2/(
tan(1/2*d*x+1/2*c)-1)-1/d/a^2/(tan(1/2*d*x+1/2*c)+1)-2/d*b/a^3*ln(tan(1/2*d*x+1/2*c)+1)
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)^2/(a+b*cos(d*x+c))^2,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more details)Is 4*b^2-4*a^2 positive or negative?
________________________________________________________________________________________
mupad [B] time = 5.92, size = 3176, normalized size = 20.49 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(cos(c + d*x)^2*(a + b*cos(c + d*x))^2),x)
[Out]
(b*atan(((b*((32*tan(c/2 + (d*x)/2)*(8*b^8 - 8*a*b^7 - 16*a^2*b^6 + 16*a^3*b^5 + 5*a^4*b^4 - 8*a^5*b^3 + 4*a^6
*b^2))/(a^6*b + a^7 - a^4*b^3 - a^5*b^2) - (2*b*((32*(2*a^11*b - 2*a^6*b^6 + a^7*b^5 + 5*a^8*b^4 - 3*a^9*b^3 -
3*a^10*b^2))/(a^8*b + a^9 - a^6*b^3 - a^7*b^2) - (64*b*tan(c/2 + (d*x)/2)*(2*a^11*b - 2*a^6*b^6 + 2*a^7*b^5 +
4*a^8*b^4 - 4*a^9*b^3 - 2*a^10*b^2))/(a^3*(a^6*b + a^7 - a^4*b^3 - a^5*b^2))))/a^3)*2i)/a^3 + (b*((32*tan(c/2
+ (d*x)/2)*(8*b^8 - 8*a*b^7 - 16*a^2*b^6 + 16*a^3*b^5 + 5*a^4*b^4 - 8*a^5*b^3 + 4*a^6*b^2))/(a^6*b + a^7 - a^
4*b^3 - a^5*b^2) + (2*b*((32*(2*a^11*b - 2*a^6*b^6 + a^7*b^5 + 5*a^8*b^4 - 3*a^9*b^3 - 3*a^10*b^2))/(a^8*b + a
^9 - a^6*b^3 - a^7*b^2) + (64*b*tan(c/2 + (d*x)/2)*(2*a^11*b - 2*a^6*b^6 + 2*a^7*b^5 + 4*a^8*b^4 - 4*a^9*b^3 -
2*a^10*b^2))/(a^3*(a^6*b + a^7 - a^4*b^3 - a^5*b^2))))/a^3)*2i)/a^3)/((64*(8*b^8 - 4*a*b^7 - 20*a^2*b^6 + 6*a
^3*b^5 + 12*a^4*b^4))/(a^8*b + a^9 - a^6*b^3 - a^7*b^2) - (2*b*((32*tan(c/2 + (d*x)/2)*(8*b^8 - 8*a*b^7 - 16*a
^2*b^6 + 16*a^3*b^5 + 5*a^4*b^4 - 8*a^5*b^3 + 4*a^6*b^2))/(a^6*b + a^7 - a^4*b^3 - a^5*b^2) - (2*b*((32*(2*a^1
1*b - 2*a^6*b^6 + a^7*b^5 + 5*a^8*b^4 - 3*a^9*b^3 - 3*a^10*b^2))/(a^8*b + a^9 - a^6*b^3 - a^7*b^2) - (64*b*tan
(c/2 + (d*x)/2)*(2*a^11*b - 2*a^6*b^6 + 2*a^7*b^5 + 4*a^8*b^4 - 4*a^9*b^3 - 2*a^10*b^2))/(a^3*(a^6*b + a^7 - a
^4*b^3 - a^5*b^2))))/a^3))/a^3 + (2*b*((32*tan(c/2 + (d*x)/2)*(8*b^8 - 8*a*b^7 - 16*a^2*b^6 + 16*a^3*b^5 + 5*a
^4*b^4 - 8*a^5*b^3 + 4*a^6*b^2))/(a^6*b + a^7 - a^4*b^3 - a^5*b^2) + (2*b*((32*(2*a^11*b - 2*a^6*b^6 + a^7*b^5
+ 5*a^8*b^4 - 3*a^9*b^3 - 3*a^10*b^2))/(a^8*b + a^9 - a^6*b^3 - a^7*b^2) + (64*b*tan(c/2 + (d*x)/2)*(2*a^11*b
- 2*a^6*b^6 + 2*a^7*b^5 + 4*a^8*b^4 - 4*a^9*b^3 - 2*a^10*b^2))/(a^3*(a^6*b + a^7 - a^4*b^3 - a^5*b^2))))/a^3)
)/a^3))*4i)/(a^3*d) - ((2*tan(c/2 + (d*x)/2)^3*(a*b^2 + a^2*b - a^3 - 2*b^3))/(a^2*(a + b)*(a - b)) + (2*tan(c
/2 + (d*x)/2)*(a*b^2 - a^2*b - a^3 + 2*b^3))/(a^2*(a + b)*(a - b)))/(d*(a + b - tan(c/2 + (d*x)/2)^4*(a - b) -
2*b*tan(c/2 + (d*x)/2)^2)) + (b^2*atan(((b^2*((32*tan(c/2 + (d*x)/2)*(8*b^8 - 8*a*b^7 - 16*a^2*b^6 + 16*a^3*b
^5 + 5*a^4*b^4 - 8*a^5*b^3 + 4*a^6*b^2))/(a^6*b + a^7 - a^4*b^3 - a^5*b^2) + (b^2*(3*a^2 - 2*b^2)*((32*(2*a^11
*b - 2*a^6*b^6 + a^7*b^5 + 5*a^8*b^4 - 3*a^9*b^3 - 3*a^10*b^2))/(a^8*b + a^9 - a^6*b^3 - a^7*b^2) + (32*b^2*ta
n(c/2 + (d*x)/2)*(3*a^2 - 2*b^2)*(-(a + b)^3*(a - b)^3)^(1/2)*(2*a^11*b - 2*a^6*b^6 + 2*a^7*b^5 + 4*a^8*b^4 -
4*a^9*b^3 - 2*a^10*b^2))/((a^6*b + a^7 - a^4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b^2)*(-(a + b)^3*(a - b)^3)^(1/2))/(a^9 - a
^3*b^6 + 3*a^5*b^4 - 3*a^7*b^2)))*(3*a^2 - 2*b^2)*(-(a + b)^3*(a - b)^3)^(1/2)*2i)/(d*(a^9 - a^3*b^6 + 3*a^5*b
^4 - 3*a^7*b^2))
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{2}{\left (c + d x \right )}}{\left (a + b \cos {\left (c + d x \right )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(d*x+c)**2/(a+b*cos(d*x+c))**2,x)
[Out]
Integral(sec(c + d*x)**2/(a + b*cos(c + d*x))**2, x)
________________________________________________________________________________________